<?php defined('_JEXEC') or die('Restricted access');?>

<form action="index.php?option=com_qcalc&view=terms" method="post" name="adminForm">
<div id="editcell">
    <table class="adminlist">
    <thead>
        <tr>
            <th width="5">
                <?php echo JText::_( 'ID' ); ?>
            </th>
            <th width="20">   <!-- checkbox to check all terms -->
                <input type="checkbox" name="toggle" value="" onclick="checkAll( <?=count($this->terms);?> );" />
            </th>
            <th width="7%" nowrap="nowrap">
				<label>Включен</label>
			</th>
			<th>
                <?php echo JText::_( 'Имя услуги' ); ?>
            </th>
			
            
        </tr>       
    </thead>
 
    <?php
    $k = 0;
 
    for ($i=0, $n=count( $this->terms ); $i < $n; $i++)
    {
        $row = $this->terms[$i];
        $checked = JHTML::_('grid.id', $i, $row->id );     //get checkbox HTML
        // get link HTML to edit task for this greeting
        $link = JRoute::_( 'administrator/index.php?option=com_qcalc&task=edit_terms&cid[]='. $row->id );
    ?>
        <tr class="<?php echo "row$k"; ?>">
            <td>
                <?php echo $row->id; ?>
            </td>
            <td>
                 <?php echo $checked; ?>
            </td>
            <td align="center">
				<a title="Отключить модуль" onclick="return listItemTask('cb0','unpublish')" href="javascript:void(0);">
				<img border="0" alt="Включен" src="images/tick.png"></a>
			</td>
			<td>
                <a href="/<?php echo $link; ?>"><?php echo $row->name; ?></a>
            </td>
            
        </tr>
    <?php
        $k = 1 - $k;    //switch row class
    }
    ?>
    </table>
</div>
<input type="hidden" name="option" value="com_qcalc" />
<input type="hidden" name="task" value="" />
<input type="hidden" name="boxchecked" value="0" />
</form>